<script lang="ts" setup>
// 对element-plus进行二次封装
defineOptions({
  name: 'icon-button'
})
const props = defineProps({
  content: {
    type: String,
    default: ''
  }
})
const emits = defineEmits(['click'])
</script>

<template>
  <el-tooltip effect="dark" :content="props.content" placement="bottom">
    <el-icon class="el-icon" @click="emits('click')">
      <slot></slot>
    </el-icon>
  </el-tooltip>
</template>

<style lang="scss" scoped>
.el-icon {
  cursor: pointer;
  &:hover {
    // background-color: #fff;
    border-radius: 10px;
  }
}
</style>
